package com.zxl.diy.weather.ui;

import android.app.Application;
import android.content.Context;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Looper;

import com.zxl.manager.privacy.utils.ApplicationHelper;

/**
 * Created by Administrator on 2016/11/5.
 */

public class WeatherApp extends Application {

    private static HandlerThread sWorkerThread = new HandlerThread("privacy-main");

    static {
        sWorkerThread.start();
    }

    private static Handler sWorker = new Handler(sWorkerThread.getLooper());

    private static Handler sHandler = new Handler(Looper.getMainLooper());

    @Override
    public void onCreate() {
        try {
            Class.forName("android.os.AsyncTask");
        } catch (Throwable ignore) {
        }
        super.onCreate();
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        ApplicationHelper.setUp(this, sWorker, sHandler);
    }

}
